<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="../../../component/pear/css/pear.css" />
</head>
<body>
<div id="descriptions"></div>
<script src="../../../component/layui/layui.js"></script>
<script src="../../../component/pear/pear.js"></script>
<script>
    layui.use(['descriptions'], function() {
        let desc = layui.descriptions;
        let url = layui.url();
        let id = url.search.id;


        desc.render({
            elem: '#descriptions',
            fieldNum: 2,
            url: '/sys/notice/' + id,
            cols: [
                { field: 'id', title: 'ID', hide: true },
                { field: 'avatar', title: '图像', hide: true },
                { field: 'title', title: '标题', longtext: true },
                { field: 'description', title: '正文', longtext: true, hide: true},
                { field: 'released', title: '已发布', newline: true, templet: function (d) {
                    return d.released == 1 ? '是' : '否';
                }},
                { field: 'receivedByName', title: '接收人' },
                { field: 'createByName', title: '创建者', newline: true },
                { field: 'createTime', title: '创建时间', templet: function (d) {
                    return layui.util.toDateString(d.createTime, "yyyy-MM-dd HH:mm:ss");
                }},
                { field: 'updateByName', title: '更新者' },
                { field: 'updateTime', title: '更新时间', templet: function (d) {
                    return layui.util.toDateString(d.updateTime, "yyyy-MM-dd HH:mm:ss");
                }},
            ]
        });
    })
</script>
</body>
</html>
